package java基础.struct;

/**
 * @author IT_Jay
 * @date 2021/12/12 15:42
 */

public class Demo06 {
    public static void main(String[] args) {
        char grade = 'C';
        //case穿透现象，需要加break
        //switch匹配一个具体的值
        switch (grade){
            case 'A':
                System.out.println("优秀！");
                break;
            case 'B':
                System.out.println("良好！");
                break;
            case 'C':
                System.out.println("合格！");
                break;
            case 'D':
                System.out.println("不合格！");
                break;
            default:
                System.out.println("未知等级！");
                break;
        }
    }
}
